<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>正则表达式</title>
</head>
<body>
            <script>
                var reg = /\d/g;                //   /d表示数字
                var s = '123abc45464%&$';     //另一种表现：var reg = /[0-9]/g;

                var r = s.match(reg);
                console.log(r)

            </script>
</body>
</html>